﻿<UserControl x:Class="SharePointExplorer.UserControls.DashboardSubItems"
             Tag="DashboardSubItems"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:SharePointExplorer.Classes"
             xmlns:kinect="clr-namespace:SharePointExplorer.KinectControls"
             mc:Ignorable="d" 
             d:DesignHeight="700" d:DesignWidth="950">

    <UserControl.Resources>
        <ItemsPanelTemplate x:Key="ItemsPanelTemplate">
            <WrapPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Height="700" Width="900" />
        </ItemsPanelTemplate>
        <ItemsPanelTemplate x:Key="ListPanelTemplate">
            <WrapPanel Orientation="Horizontal" Height="210" Width="950" />
        </ItemsPanelTemplate>
        <local:URLConverter x:Key="UrlKey"/>
    </UserControl.Resources>
    <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
        <!--<Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="210"/>
        </Grid.RowDefinitions>-->
            <kinect:KinectListBox x:Name="DashboardSubDetailsList" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center" Background="Transparent"  ItemsPanel="{StaticResource ItemsPanelTemplate}" Style="{StaticResource ListBoxStyle}">
                <kinect:KinectListBox.ItemTemplate>
                    <DataTemplate>
                        <kinect:KinectButton Width="175" Height="175" Margin="10" Background="Orange" BorderThickness="0" Style="{StaticResource KinectButtonStyle}" Click="KinectButton_Click" >
                            <Grid Background="Orange" Width="175" Height="175" Margin="5">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="10"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="10"/>
                                    <RowDefinition Height="*"/>
                                    <!--<RowDefinition Height="20"/>
                                <RowDefinition Height="*"/>-->
                                </Grid.RowDefinitions>
                                <Image Name="listImage" Source="{Binding Converter={StaticResource UrlKey}}" Grid.Row="1" Width="75" Height="75" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                                <!--<TextBlock Name="listItemId" Text="{Binding ListItemAllFiles.Id}" Grid.Row="3" Foreground="White" FontSize="20" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>-->
                                <TextBlock x:Name="listTitle" Text="{Binding Name}" Foreground="White" Grid.Row="3" FontSize="20" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
                            </Grid>
                        </kinect:KinectButton>
                    </DataTemplate>
                </kinect:KinectListBox.ItemTemplate>
            </kinect:KinectListBox>
        <!--<kinect:KinectListBox Height="210" Visibility="Collapsed" Grid.Row="1" x:Name="DashboardDetailsList" Background="Transparent" HorizontalAlignment="Stretch" ItemsPanel="{StaticResource ListPanelTemplate}" Style="{StaticResource ListBoxStyle}">
            <kinect:KinectListBox.ItemTemplate>
                <DataTemplate>
                        <kinect:KinectButton Width="175" Height="175" Margin="10"  BorderThickness="0" Style="{StaticResource KinectButtonStyle}" Click="KinectButton1_Click" >
                        <Grid Background="Orange" Width="175" Height="175" Margin="5">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                                <Image Name="listImage" Source="../Images/FileExplorer.png" Grid.Row="1" Width="66" Height="66" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                            <TextBlock Name="listTitle" Text="{Binding Title}" Grid.Row="3" Foreground="White" Margin="10,5,5,5" FontSize="20" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
                            </Grid>
                        </kinect:KinectButton>
                    
                </DataTemplate>
            </kinect:KinectListBox.ItemTemplate>
        </kinect:KinectListBox>-->
        <kinect:KinectButton x:Name="btnNext" Grid.Row="0" Style="{StaticResource KinectButtonStyle}" Background="Black" Width="75" Height="75" HorizontalAlignment="Right" VerticalAlignment="Center" BorderBrush="Transparent"  Click="btnNext_Click">
            <Image Source="../Images/next.png" Height="75" Width="75"></Image>
        </kinect:KinectButton>
        <kinect:KinectButton x:Name="btnPrevious" Grid.Row="0" Style="{StaticResource KinectButtonStyle}" Background="Black" Width="75" Height="75" Margin="-100" HorizontalAlignment="Left" VerticalAlignment="Center" BorderBrush="Transparent"  Click="btnPrevious_Click">
            <Image Source="../Images/back.png" Height="75" Width="75"></Image>
        </kinect:KinectButton>
    </Grid>
</UserControl>
